package router

import (
	"github.com/gin-gonic/gin"
	"one_exam/global"
	"one_exam/internal/api"
	"one_exam/internal/utils"
)

func GoodsRouter(r *gin.RouterGroup) {
	goods := r.Group("goods")
	{
		goods.Use(utils.JWTAuth(global.Global.Jwt.SecretKey))
		goods.POST("/addGoods", api.AddGoods)
		goods.GET("/list", api.GoodsList)
		goods.POST("/addWould", api.AddWould)
		goods.POST("/buyBy", api.Buy)
	}
}
